﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text;
using System.Text.RegularExpressions;

using System.Web.Security;
using System.Web.Profile;

namespace CooWork.Models
{
    public static class SqlClass
    {
        public static void JbackSql(string ulist, int taskId)
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("'");
            var arr = ulist.Split(',');            
            foreach (string s in arr)
            {
                sb.Append(s).Append("','");
            }
            string sql = sb.ToString().Substring(0, sb.Length - 2);
            DataProvider.ExecuteNonQuery("delete from [CooWatchlist] where TaskId="+taskId.ToString()+" and Observer in ("+sql+")");
        }

    }

   


}